<?php
/*
 * @Author: lokei
 * @Date: 2022-09-28 20:55:13
 * @LastEditors: lokei
 * @LastEditTime: 2023-10-23 17:28:44
 * @Description: 
 */
$router->group(['prefix' => env('ROUTER_PREFIX') . 'api'], function () use ($router) {
	
	/**Store商家门店 */
	// 商家门店
	$router->group(['prefix' => 'store', 'middleware' => 'auth'], function () use ($router) {
		// 商家门店统计数据
		$router->get('ofMe', [
			'as' => 'storeOfMe', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@ofMe'
		]);
		$router->get('statusOfMe', [
			'as' => 'storeStatusOfMe', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@statusOfMe'
		]);
		$router->get('roleOfMe', [
			'as' => 'storeRoleOfMe', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@roleOfMe'
		]);
		$router->post('register', [
			'as' => 'registerStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@register'
		]);
		
	});

	$router->group(['prefix' => 'store'], function () use ($router) {
		// 商家门店统计数据
		$router->get('statistic/all', [
			'as' => 'storeStatisticAll', 'uses' => '\App\Http\Controllers\Store\Statistic\StatisticController@all'
		]);
		$router->post('statistic/incPv', [
			'as' => 'storeStatisticIncPv', 'uses' => '\App\Http\Controllers\Store\Statistic\StatisticController@incPv'
		]);
		
		// 审核
		$router->get('audit/get', [
			'as' => 'getStoreAudit', 'uses' => '\App\Http\Controllers\Store\Audit\AuditController@get'
		]);
		$router->post('audit/set', [
			'as' => 'setStoreAudit', 'uses' => '\App\Http\Controllers\Store\Audit\AuditController@set'
		]);
		
		// 信誉
		$router->post('credit/certificate/set', [
			'as' => 'setStoreCreditCertificate', 'uses' => '\App\Http\Controllers\Store\Credit\CertificateController@set'
		]);
		$router->post('credit/certificate/cancel', [
			'as' => 'cancelStoreCreditCertificate', 'uses' => '\App\Http\Controllers\Store\Credit\CertificateController@cancel'
		]);
		
		// 抖店
		$router->get('doudian/get', [
			'as' => 'getStoreDoudian', 'uses' => '\App\Http\Controllers\Store\Douyin\DoudianController@get'
		]);
		$router->post('doudian/set', [
			'as' => 'setStoreDoudian', 'uses' => '\App\Http\Controllers\Store\Douyin\DoudianController@set'
		]);

		// 营业执照
		$router->get('license/get', [
			'as' => 'getStoreLicense', 'uses' => '\App\Http\Controllers\Store\License\LicenseController@get'
		]);
		$router->post('license/set', [
			'as' => 'setStoreLicense', 'uses' => '\App\Http\Controllers\Store\License\LicenseController@set'
		]);

		
		// 模式
		$router->get('mode/app/ofStore', [
			'as' => 'getStoreMode', 'uses' => '\App\Http\Controllers\Store\Mode\AppController@get'
		]);
		$router->post('mode/app/set', [
			'as' => 'setStoreMode', 'uses' => '\App\Http\Controllers\Store\Mode\AppController@set'
		]);
		
		
		// 商家门店管理
		$router->get('list', [
			'as' => 'storeList', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@list'
		]);
		$router->get('ofIds', [
			'as' => 'storeOfIds', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@ofIds'
		]);
		$router->get('get', [
			'as' => 'getStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@get'
		]);
		// 门店客服电话
		$router->get('contacts/get', [
			'as' => 'getStoreContacts', 'uses' => '\App\Http\Controllers\Store\Contacts\ContactsController@get'
		]);
		$router->post('contacts/set', [
			'as' => 'setStoreContacts', 'uses' => '\App\Http\Controllers\Store\Contacts\ContactsController@set'
		]);
		$router->get('contacts/getMobile', [
			'as' => 'getStoreContactsMobile', 'uses' => '\App\Http\Controllers\Store\Contacts\ContactsController@getMobile'
		]);
		// 门店收件
		$router->get('consignee/get', [
			'as' => 'getStoreConsignee', 'uses' => '\App\Http\Controllers\Store\Consignee\ConsigneeController@get'
		]);
		$router->post('consignee/set', [
			'as' => 'setStoreConsignee', 'uses' => '\App\Http\Controllers\Store\Consignee\ConsigneeController@set'
		]);

		// 工商信息
		$router->get('gongshang/get', [
			'as' => 'getStoreGongShang', 'uses' => '\App\Http\Controllers\Store\GongShang\GongShangController@get'
		]);
		$router->post('gongshang/set', [
			'as' => 'setStoreGongShang', 'uses' => '\App\Http\Controllers\Store\GongShang\GongShangController@set'
		]);

		$router->post('create', [
			'as' => 'createStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@create'
		]);
		$router->post('update', [
			'as' => 'updateStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@update'
		]);
		$router->post('delete', [
			'as' => 'deleteStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@delete'
		]);
		$router->post('setOrder', [
			'as' => 'setOrderStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@setOrder'
		]);
		$router->post('auth/bindUser', [
			'as' => 'bindUserForStore', 'uses' => '\App\Http\Controllers\Store\Auth\AuthController@bindUser'
		]);
		$router->post('auth/cancelBindUser', [
			'as' => 'cancelBindUserForStore', 'uses' => '\App\Http\Controllers\Store\Auth\AuthController@cancelBindUser'
		]);
		
		// 商家门店标签分类
		$router->get('tag/ofStore', [
			'as' => 'getStoreTag', 'uses' => '\App\Http\Controllers\Store\Tag\TagController@ofStore'
		]);
		$router->post('tag/set', [
			'as' => 'setStoreTag', 'uses' => '\App\Http\Controllers\Store\Tag\TagController@set'
		]);
		$router->get('type/ofStore', [
			'as' => 'getStoreType', 'uses' => '\App\Http\Controllers\Store\Type\TypeController@ofStore'
		]);
		$router->post('type/set', [
			'as' => 'setStoreType', 'uses' => '\App\Http\Controllers\Store\Type\TypeController@set'
		]);

		
		// 商家门店设置
		$router->get('conf/get', [
			'as' => 'getStoreConf', 'uses' => '\App\Http\Controllers\Store\Conf\ConfController@get'
		]);
		$router->post('conf/update', [
			'as' => 'updateStoreConf', 'uses' => '\App\Http\Controllers\Store\Conf\ConfController@update'
		]);
		
		// 商家门店银行卡
		$router->get('bank/get', [
			'as' => 'getStoreBank', 'uses' => '\App\Http\Controllers\Store\Bank\BankController@get'
		]);
		$router->post('bank/update', [
			'as' => 'updateStoreBank', 'uses' => '\App\Http\Controllers\Store\Bank\BankController@update'
		]);

		
		// 收银支付
		$router->get('pay/get', [
			'as' => 'getStorePay', 'uses' => '\App\Http\Controllers\Store\Pay\PayController@get'
		]);
		$router->post('pay/set', [
			'as' => 'setStorePay', 'uses' => '\App\Http\Controllers\Store\Pay\PayController@set'
		]);

		
		// 商家门店设置
		$router->get('recommend/get', [
			'as' => 'getStoreRecommend', 'uses' => '\App\Http\Controllers\Store\RecommendController@get'
		]);
		$router->post('recommend/set', [
			'as' => 'setStoreRecommend', 'uses' => '\App\Http\Controllers\Store\RecommendController@set'
		]);
		
	});

	$router->group(['prefix' => 'city'], function () use ($router) {
		// 城市小区
		$router->get('list', [
			'as' => 'cityList', 'uses' => '\App\Http\Controllers\Store\City\CityController@list'
		]);
		$router->get('get', [
			'as' => 'getCity', 'uses' => '\App\Http\Controllers\Store\City\CityController@get'
		]);
		$router->post('create', [
			'as' => 'createCity', 'uses' => '\App\Http\Controllers\Store\City\CityController@create'
		]);
		$router->post('update', [
			'as' => 'updateCity', 'uses' => '\App\Http\Controllers\Store\City\CityController@update'
		]);
		$router->post('delete', [
			'as' => 'deleteCity', 'uses' => '\App\Http\Controllers\Store\City\CityController@delete'
		]);

		// 省份
		$router->get('prov/list', [
			'as' => 'provList', 'uses' => '\App\Http\Controllers\Store\City\ProvController@list'
		]);
		$router->get('prov/get', [
			'as' => 'getProv', 'uses' => '\App\Http\Controllers\Store\City\ProvController@get'
		]);
		$router->post('prov/create', [
			'as' => 'createProv', 'uses' => '\App\Http\Controllers\Store\City\ProvController@create'
		]);
		$router->post('prov/update', [
			'as' => 'updateProv', 'uses' => '\App\Http\Controllers\Store\City\ProvController@update'
		]);
		$router->post('prov/delete', [
			'as' => 'deleteProv', 'uses' => '\App\Http\Controllers\Store\City\ProvController@delete'
		]);
	});

	$router->group(['prefix' => 'city/area'], function () use ($router) {
		// 城市小区
		$router->get('list', [
			'as' => 'areaList', 'uses' => '\App\Http\Controllers\Store\City\AreaController@list'
		]);
		$router->get('get', [
			'as' => 'getArea', 'uses' => '\App\Http\Controllers\Store\City\AreaController@get'
		]);
		$router->post('create', [
			'as' => 'createArea', 'uses' => '\App\Http\Controllers\Store\City\AreaController@create'
		]);
		$router->post('update', [
			'as' => 'updateArea', 'uses' => '\App\Http\Controllers\Store\City\AreaController@update'
		]);
		$router->post('delete', [
			'as' => 'deleteArea', 'uses' => '\App\Http\Controllers\Store\City\AreaController@delete'
		]);
	});

	$router->group(['prefix' => 'city/district'], function () use ($router) {
		// 城市小区
		$router->get('list', [
			'as' => 'DistrictList', 'uses' => '\App\Http\Controllers\Store\City\DistrictController@list'
		]);
		$router->get('get', [
			'as' => 'getDistrict', 'uses' => '\App\Http\Controllers\Store\City\DistrictController@get'
		]);
		$router->post('create', [
			'as' => 'createDistrict', 'uses' => '\App\Http\Controllers\Store\City\DistrictController@create'
		]);
		$router->post('update', [
			'as' => 'updateDistrict', 'uses' => '\App\Http\Controllers\Store\City\DistrictController@update'
		]);
		$router->post('delete', [
			'as' => 'deleteDistrict', 'uses' => '\App\Http\Controllers\Store\City\DistrictController@delete'
		]);
	});

	
	$router->group(['prefix' => 'store/douyin'], function () use ($router) {
		// 抖店
		$router->get('list', [
			'as' => 'douyinStoreList', 'uses' => '\App\Http\Controllers\Store\Douyin\StoreController@list'
		]);
		
	});
	
});
